<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>接单广场 - 多角色服务平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
        }
        
        body {
            background-color: #f8f9fa;
            color: #333;
        }
        
        /* 头部样式 */
        .header {
            background: linear-gradient(135deg, #1890ff, #096dd9);
            color: white;
            padding: 12px 15px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        
        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .location {
            display: flex;
            align-items: center;
            font-size: 14px;
        }
        
        .location i {
            margin-right: 5px;
        }
        
        .user-info {
            display: flex;
            align-items: center;
        }
        
        .avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background-color: #fff;
            color: #1890ff;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 8px;
            font-weight: bold;
            font-size: 14px;
        }
        
        /* 搜索区域 */
        .search-container {
            padding: 10px 15px;
            background: white;
        }
        
        .search-box {
            display: flex;
            background: #f5f5f5;
            border-radius: 20px;
            padding: 8px 15px;
            align-items: center;
        }
        
        .search-box input {
            flex: 1;
            background: transparent;
            border: none;
            outline: none;
            font-size: 14px;
            margin-left: 10px;
        }
        
        /* 分类区域 */
        .categories {
            display: flex;
            overflow-x: auto;
            padding: 15px 10px;
            background: white;
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        
        .categories::-webkit-scrollbar {
            display: none;
        }
        
        .category-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 70px;
            padding: 8px 5px;
            border-radius: 10px;
            margin: 0 5px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .category-item:hover, .category-item.active {
            background: #e6f7ff;
        }
        
        .category-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #f0f5ff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            margin-bottom: 6px;
            color: #1890ff;
        }
        
        .category-name {
            font-size: 12px;
            text-align: center;
        }
        
        /* 优先级筛选 */
        .priority-filter {
            padding: 10px 15px;
            background: white;
            border-top: 1px solid #eee;
            border-bottom: 1px solid #eee;
        }
        
        .priority-title {
            font-size: 14px;
            margin-bottom: 8px;
            color: #666;
        }
        
        .priority-buttons {
            display: flex;
            gap: 10px;
        }
        
        .priority-btn {
            flex: 1;
            padding: 8px 5px;
            background: #f5f5f5;
            border-radius: 5px;
            text-align: center;
            font-size: 13px;
            cursor: pointer;
        }
        
        .priority-btn.active {
            background: #1890ff;
            color: white;
        }
        
        /* 订单列表 */
        .order-list {
            padding: 10px 15px;
            min-height: calc(100vh - 230px);
        }
        
        .order-card {
            background: white;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            position: relative;
            border-left: 4px solid #1890ff;
        }
        
        .order-card.urgent {
            border-left-color: #ff4d4f;
        }
        
        .order-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            align-items: center;
        }
        
        .order-title {
            font-size: 16px;
            font-weight: 600;
            flex: 1;
        }
        
        .order-badge {
            font-size: 12px;
            padding: 3px 8px;
            border-radius: 10px;
        }
        
        .badge-new {
            background: #e6f7ff;
            color: #1890ff;
        }
        
        .badge-urgent {
            background: #fff2f0;
            color: #ff4d4f;
        }
        
        .order-meta {
            display: flex;
            margin-bottom: 12px;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            font-size: 13px;
            color: #666;
            margin-right: 15px;
        }
        
        .meta-item i {
            margin-right: 5px;
            color: #1890ff;
        }
        
        .order-description {
            font-size: 13px;
            color: #666;
            margin-bottom: 15px;
            line-height: 1.5;
            background: #f9f9f9;
            padding: 10px;
            border-radius: 5px;
        }
        
        .order-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
        }
        
        .order-payment {
            font-size: 18px;
            font-weight: bold;
            color: #fa541c;
        }
        
        .order-time {
            font-size: 12px;
            color: #999;
        }
        
        .btn-take {
            padding: 8px 20px;
            background: #1890ff;
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-take:hover {
            background: #096dd9;
        }
        
        /* TabBar 底部导航 */
        .tabbar {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 60px;
            background: #fff;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: space-around;
            align-items: center;
            z-index: 1000;
        }
        
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            flex: 1;
            height: 100%;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
        }
        
        .tab-item.active .tab-icon,
        .tab-item.active .tab-label {
            color: #1890ff;
        }
        
        .tab-icon {
            font-size: 20px;
            margin-bottom: 4px;
            color: #666;
        }
        
        .tab-label {
            font-size: 11px;
            color: #666;
        }
        
        /* 普通用户特殊样式 */
        .user-tab .tab-item:nth-child(1) {
            background: #f0f8ff;
        }
        
        .user-tab .tab-item:nth-child(1) .tab-icon {
            color: #1890ff;
        }
        
        .user-tab .tab-item:nth-child(1) .tab-label {
            color: #1890ff;
        }
        
        /* 隐藏其他角色的TabBar */
        .hidden {
            display: none;
        }
        
        /* 浮动消息按钮 */
        .float-message {
            position: fixed;
            bottom: 80px;
            left: 20px;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #36cfc9, #13c2c2);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            cursor: pointer;
            z-index: 999;
        }
        
        /* 提示气泡 */
        .badge-notification {
            position: absolute;
            top: -5px;
            right: -5px;
            background: #ff4d4f;
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    </style>
</head>
<body>
    <!-- 头部区域 -->
    <div class="header">
        <div class="top-bar">
            <div class="location">
                <i class="fas fa-map-marker-alt"></i>
                <span id="current-city">南宁市</span>
            </div>
            <div class="user-info">
                <div class="avatar">张</div>
                <div class="user-name">张三</div>
            </div>
        </div>
        <div class="id-display">
            <span>平台ID: </span><span id="user-id">NF123456</span>
        </div>
    </div>
    
    <!-- 搜索区域 -->
    <div class="search-container">
        <div class="search-box">
            <i class="fas fa-search"></i>
            <input type="text" placeholder="搜索日结任务、地点..." id="search-input">
        </div>
    </div>
    
    <!-- 任务分类区域 -->
    <div class="categories">
        <div class="category-item active">
            <div class="category-icon">
                <i class="fas fa-utensils"></i>
            </div>
            <div class="category-name">餐饮</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-tshirt"></i>
            </div>
            <div class="category-name">促销</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-warehouse"></i>
            </div>
            <div class="category-name">搬运</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-truck"></i>
            </div>
            <div class="category-name">配送</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-clinic-medical"></i>
            </div>
            <div class="category-name">家政</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-graduation-cap"></i>
            </div>
            <div class="category-name">家教</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-user-tie"></i>
            </div>
            <div class="category-name">礼仪</div>
        </div>
        <div class="category-item">
            <div class="category-icon">
                <i class="fas fa-wrench"></i>
            </div>
            <div class="category-name">维修</div>
        </div>
    </div>
    
    <!-- 优先级筛选 -->
    <div class="priority-filter">
        <div class="priority-title">优先显示</div>
        <div class="priority-buttons">
            <div class="priority-btn active">全部订单</div>
            <div class="priority-btn">附近订单</div>
            <div class="priority-btn">急招订单</div>
        </div>
    </div>
    
    <!-- 订单列表 -->
    <div class="order-list">
        <!-- 订单卡片1 -->
        <div class="order-card urgent">
            <div class="order-header">
                <div class="order-title">餐厅晚班服务员</div>
                <div class="order-badge badge-urgent">急聘</div>
            </div>
            
            <div class="order-meta">
                <div class="meta-item">
                    <i class="fas fa-map-marker-alt"></i>
                    <span>青秀区万象城</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-walking"></i>
                    <span>距离1.5km</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-clock"></i>
                    <span>4小时/天</span>
                </div>
            </div>
            
            <div class="order-description">
                急需3名晚班服务员，工作时间18:00-22:00，主要工作为服务顾客、上菜、清理桌面。有经验者优先。
            </div>
            
            <div class="order-footer">
                <div>
                    <div class="order-payment">¥200</div>
                    <div class="order-time">今日17:30开始</div>
                </div>
                <button class="btn-take">立即接单</button>
            </div>
        </div>
        
        <!-- 订单卡片2 -->
        <div class="order-card">
            <div class="order-header">
                <div class="order-title">超市理货员</div>
                <div class="order-badge badge-new">新发布</div>
            </div>
            
            <div class="order-meta">
                <div class="meta-item">
                    <i class="fas fa-map-marker-alt"></i>
                    <span>西乡塘区沃尔玛</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-walking"></i>
                    <span>距离3.2km</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-clock"></i>
                    <span>8小时/天</span>
                </div>
            </div>
            
            <div class="order-description">
                超市早班理货员，工作时间7:00-15:00，要求工作细心，有责任心，能独立完成商品上架理货工作。
            </div>
            
            <div class="order-footer">
                <div>
                    <div class="order-payment">¥150</div>
                    <div class="order-time">每天需1名</div>
                </div>
                <button class="btn-take">立即接单</button>
            </div>
        </div>
        
        <!-- 订单卡片3 -->
        <div class="order-card urgent">
            <div class="order-header">
                <div class="order-title">展会礼仪接待</div>
                <div class="order-badge badge-urgent">急聘</div>
            </div>
            
            <div class="order-meta">
                <div class="meta-item">
                    <i class="fas fa-map-marker-alt"></i>
                    <span>国际会展中心</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-walking"></i>
                    <span>距离4.8km</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-clock"></i>
                    <span>6小时/天</span>
                </div>
            </div>
            
            <div class="order-description">
                急需展会礼仪10名（女性优先），要求162cm以上，形象气质佳，普通话标准，负责展会引导接待。
            </div>
            
            <div class="order-footer">
                <div>
                    <div class="order-payment">¥300</div>
                    <div class="order-time">明日8:30开始</div>
                </div>
                <button class="btn-take">立即接单</button>
            </div>
        </div>
        
        <!-- 订单卡片4 -->
        <div class="order-card">
            <div class="order-header">
                <div class="order-title">物流分拣员</div>
                <div class="order-badge badge-new">新发布</div>
            </div>
            
            <div class="order-meta">
                <div class="meta-item">
                    <i class="fas fa-map-marker-alt"></i>
                    <span>高新区京东物流园</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-walking"></i>
                    <span>距离6.5km</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-clock"></i>
                    <span>5小时/班</span>
                </div>
            </div>
            
            <div class="order-description">
                急招晚班分拣员，工作时间20:00-次日1:00，负责快递包裹分类、扫描、装车。
            </div>
            
            <div class="order-footer">
                <div>
                    <div class="order-payment">¥180</div>
                    <div class="order-time">每天需5名</div>
                </div>
                <button class="btn-take">立即接单</button>
            </div>
        </div>
        
        <!-- 订单卡片5 -->
        <div class="order-card">
            <div class="order-header">
                <div class="order-title">家教辅导（初中数学）</div>
                <div class="order-badge badge-new">新发布</div>
            </div>
            
            <div class="order-meta">
                <div class="meta-item">
                    <i class="fas fa-map-marker-alt"></i>
                    <span>江南区荣宝华商城</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-walking"></i>
                    <span>距离2.1km</span>
                </div>
                <div class="meta-item">
                    <i class="fas fa-clock"></i>
                    <span>2小时/次</span>
                </div>
            </div>
            
            <div class="order-description">
                辅导初一学生数学，每周二、四晚上19:30-21:30，要求有教学经验，有耐心，擅长解题思路讲解。
            </div>
            
            <div class="order-footer">
                <div>
                    <div class="order-payment">¥100/次</div>
                    <div class="order-time">本周开始</div>
                </div>
                <button class="btn-take">立即接单</button>
            </div>
        </div>
    </div>
    
    <!-- 浮动消息按钮 -->
    <div class="float-message">
        <i class="fas fa-comment-dots"></i>
        <div class="badge-notification">3</div>
    </div>
    
    <!-- 普通用户 TabBar -->
    <nav class="tabbar user-tab">
        <div class="tab-item active">
            <div class="tab-icon"><i class="fas fa-home"></i></div>
            <div class="tab-label">接单广场</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-tasks"></i></div>
            <div class="tab-label">悬赏大厅</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-graduation-cap"></i></div>
            <div class="tab-label">能力提升</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-industry"></i></div>
            <div class="tab-label">工厂招聘</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-user"></i></div>
            <div class="tab-label">个人中心</div>
        </div>
    </nav>
    
    <!-- 从业者 TabBar -->
    <nav class="tabbar worker-tab hidden">
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-list"></i></div>
            <div class="tab-label">任务大厅</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-wallet"></i></div>
            <div class="tab-label">钱包</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-history"></i></div>
            <div class="tab-label">接单记录</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-star"></i></div>
            <div class="tab-label">信用评级</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-user"></i></div>
            <div class="tab-label">我的</div>
        </div>
    </nav>
    
    <!-- 商家 TabBar -->
    <nav class="tabbar merchant-tab hidden">
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-chart-line"></i></div>
            <div class="tab-label">店铺数据</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-bullhorn"></i></div>
            <div class="tab-label">任务发布</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-users"></i></div>
            <div class="tab-label">客户管理</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-file-invoice"></i></div>
            <div class="tab-label">订单处理</div>
        </div>
        <div class="tab-item">
            <div class="tab-icon"><i class="fas fa-user"></i></div>
            <div class="tab-label">我的</div>
        </div>
    </nav>
    
    <script>
        // 角色切换函数
        function switchRole(role) {
            // 隐藏所有TabBar
            document.querySelectorAll('.tabbar').forEach(tab => {
                tab.classList.add('hidden');
            });
            
            // 显示目标TabBar
            const targetTab = document.querySelector(`.${role}-tab`);
            if (targetTab) {
                targetTab.classList.remove('hidden');
            }
        }
        
        // 为Tab项添加点击事件
        document.querySelectorAll('.tab-item').forEach(item => {
            item.addEventListener('click', function() {
                // 清除同一TabBar中所有项目的激活状态
                const parentTab = this.closest('.tabbar');
                parentTab.querySelectorAll('.tab-item').forEach(el => {
                    el.classList.remove('active');
                });
                
                // 激活当前点击的Tab
                this.classList.add('active');
            });
        });
        
        // 分类按钮点击事件
        document.querySelectorAll('.category-item').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.category-item').forEach(el => {
                    el.classList.remove('active');
                });
                this.classList.add('active');
                
                const categoryName = this.querySelector('.category-name').textContent;
                alert(`已筛选: ${categoryName}类订单`);
            });
        });
        
        // 优先级按钮点击事件
        document.querySelectorAll('.priority-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                document.querySelectorAll('.priority-btn').forEach(el => {
                    el.classList.remove('active');
                });
                this.classList.add('active');
                
                const filterType = this.textContent;
                alert(`已按${filterType}筛选订单`);
            });
        });
        
        // 接单按钮事件
        document.querySelectorAll('.btn-take').forEach(btn => {
            btn.addEventListener('click', function() {
                const taskTitle = this.closest('.order-card').querySelector('.order-title').textContent;
                alert(`您已申请接单: ${taskTitle}\n等待雇主确认中...`);
            });
        });
        
        // 搜索框事件
        document.getElementById('search-input').addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                alert(`搜索: ${this.value}`);
            }
        });
        
        // 消息按钮事件
        document.querySelector('.float-message').addEventListener('click', function() {
            alert('查看最新任务通知');
        });
        
        // 初始化显示普通用户 TabBar
        switchRole('user');
    </script>
</body>
</html>
